<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Hoạt động công ty</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script language="javascript" src="ajaxfunction.js"></script>
<script src="editor/ckeditor.js" language="javascript"></script>
<script type="text/javascript" src="js/jquery-1.6.js"></script>
<script type="text/javascript" src="js/jquery.corner.js"></script>
<script language="javascript">
	function add_img()
	{
	var slanh=parseInt(document.themhd.slanh.value);
	//var color_gr="background-color:#F2F2F2;";
	if (slanh==1)
		idname="danhsach";
	else
		idname="danhsach"+slanh;
	slanh=slanh+1;
	t="Ảnh "+slanh+":  ";
	ten="anh"+slanh;
	idanh="idanh" + slanh;
	document.themhd.slanh.value=slanh;
	var danhsachanh=document.getElementById("danhsachanh");
	var text=document.createTextNode(t);
	//text.color="#9900FF";
	danhsachanh.appendChild(text);
	t.color="#9900FF";
	var image=document.createElement('input');
	image.type="file";
	image.size="42";
	image.name="anh"+slanh;
	image.id=idanh;
	//image.background-color="#F2F2F2";
	danhsachanh.appendChild(image);
	/*image=document.createElement('img');
	image.src="pictures/xoa.png";
	image.onclick=function() {xoadiachianh(this,idanh)};
	image.width="10";
	image.height="10";
	image.border=0;
	image.title="Xóa ảnh";
	danhsachanh.appendChild(image);*/
	var tagbr=document.createElement('br');
	danhsachanh.appendChild(tagbr);
	
}
</script>
<script type="text/javascript">
	    $("div#idtable").corner("keep"); // Đoạn code này sẽ bo tròn thẻ div có id là demo
	</script>
</head>

<body>
<?php
					include("ckeditor/ckeditor.php");
				?>
	<div id="idtable" class="styleform">			
		<form action="xulythemhoatdongcty.php" method="post" name="themhd">
		
		<table align="center">
			<tr><td colspan="2" class="styletitle">HOẠT ĐỘNG CÔNG TY</td></tr>
			<tr>
				<td class="stylelitle"> </td><td><label class="stylelitle">+&nbsp;Tiêu đề:</label>
				  &nbsp;<textarea type="text" cols="60" rows="2" name="tieude"></textarea></td>
			</tr>
			<tr>
				<td></td><td class="stylelitle">+&nbsp;Nội dung</td>
			</tr>
			<tr>
				<td>&nbsp;</td><td>
				<textarea name="noidung" id="idnoidung" class="ck" cols="30" rows="5"></textarea>
				<?php
					$CKEditor = new CKEditor();
					$CKEditor->basePath = 'ckeditor/';
					$CKEditor->replace("idnoidung");
				?>
				</td>
			</tr>
			<script type="text/javascript" language="javascript">
   				 ckeditor.replace( 'idnoidung' );
			</script> 
			<tr>
				<td class="stylelitle"></td>
				<td><label class="stylelitle">+&nbsp;Nhóm thông tin:</label>&nbsp;
					<select name="thongtin">
					<?php
						include("csdl.php");
						$knoi=new csdl();
						$kq=$knoi->queryCsdl("select stt,tieude from thongtincongty");
						while($n=mysql_fetch_array($kq))
						{
					?>	
							<option value="<?php echo $n['stt']; ?>"><?php echo $n['tieude']; ?></option>
					<?php	
						}
					?>
					</select>				</td>
			</tr>
			<tr>
				<td></td><td class="stylelitle">+&nbsp;Ảnh kèm theo:</td>
			</tr>
			<tr>
				<td class="stylelitle">&nbsp;</td><td height="30" style="text-align:center">Ảnh 1:&nbsp;<input type="file" name="anh1" id="inputfile" size="42" /><input type="hidden" name="slanh" value="1" />
				<div id="danhsachanh" style="position:relative"></div>
				</td>
			</tr>
			<tr>
				<td colspan="2" align="center"><input type="button" class="styleaddimg" name="themanh" value="Thêm ảnh" onclick="add_img()" /></td>
			</tr>
			<tr>
				<td colspan="2" align="center"><input type="submit" class="stylesubmit" value="  Thêm hoạt động" />&nbsp;&nbsp;&nbsp;<input type="reset" class="stylereset" value="   Hủy bỏ" /></td>
			</tr>
		</table>
		<p>&nbsp;</p>
	</form>
	</div>
</body>
</html>
